home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / dgarbage.zip / DGARBAGE.DOC next >
Text File  |  1988-05-09  |  16KB  |  358 lines

  1.                              DGARBAGE VERSION 1.1
  2.                              -------------------- 
  3.  
  4.  
  5.                                   DISCLAIMER 
  6.                                   ---------- 
  7.  
  8.          This program is provided as is and I accept no responsibility 
  9.          for  any  loss  or damage of any files or data  that  may  be 
  10.          caused  by  using  this  program.  I  have  performed  fairly 
  11.          extensive testing of the program, but it is not possible  for 
  12.          me  to  exhaustively test every potential situation.  If  the 
  13.          data in the file you wish to process is important to you then 
  14.          make  a copy of the file and process that. I have  never  had 
  15.          any  problems  with  the input file during  my  testing,  but 
  16.          anything is possible. 
  17.  
  18.          Once again, I AM NOT RESPONSIBLE IN ANY WAY FOR ANYTHING. 
  19.          (Or as my mother always says, I am totally irresponsible). 
  20.  
  21.  
  22.  
  23.  
  24.                                  INTRODUCTION
  25.                                  ------------
  26.  
  27.          This  utility program removes all non - printable  characters 
  28.          from  an ASCII text file and restricts the line length  to  a 
  29.          specified  maximum number of characters. It was  designed  to 
  30.          remove the "line noise" characters from capture files made by 
  31.          a communications program on line to a bulletin board. 
  32.  
  33.          The  text is read from a file specified on the  command  line 
  34.          and the resulting text after processing is output to a second 
  35.          file,  the  name of which is also specified  on  the  command 
  36.          line.  The  original  file is  left  untouched  which  allows 
  37.          multiple  processing  with different options  set  until  the 
  38.          desired result is achieved. 
  39.  
  40.          All  characters with an ASCII value less than  32,  excepting 
  41.          ASCII  10  (Line  Feed) and ASCII 13  (Carriage  Return)  are 
  42.          removed  from  the text. By default, all characters  with  an 
  43.          ASCII  value of greater than 127 are also  removed,  although 
  44.          this  can be changed by command line options so  that  either 
  45.          the  character  is  converted to a  seven  bit  character  by 
  46.          stripping the eighth bit, or is left entirely unchanged. 
  47.  
  48.  
  49.  
  50.  
  51.                                      USAGE
  52.                                      -----
  53.  
  54.  
  55.          The syntax for the command is:- 
  56.  
  57.          DGARBAGE infile outfile (options) 
  58.  
  59.          Infile   and   outfile  MUST  be  specified   -   they   are, 
  60.          respectively,  the  file  containing  the  raw  text  to   be 
  61.          processed  and  the  file  that  will  hold  the  text  after 
  62.          processing.  
  63.  
  64.          Infile  must exist and must either be present in the  current 
  65.          directory  or must have an appropriate path prefixed to  it's 
  66.          name; e.g.:- 
  67.  
  68.          DGARBAGE  file1  file2  
  69.          (if the file is in the current directory) 
  70.  
  71.          DGARBAGE  \dir1\dir2\file1  file2  
  72.          (if the file is in the directory \dir1\dir2). 
  73.  
  74.          Outfile  need not exist and will be created if necessary.  If  
  75.          it  DOES exist you will be prompted as to whether or not  you  
  76.          wish  to overwrite it. For example if "file2" already  exists  
  77.          and you enter the following command (in the root directory):- 
  78.  
  79.          DGARBAGE file1 file2 
  80.  
  81.          then the following prompt will be displayed:- 
  82.  
  83.          File C:\FILE2 Already Exists 
  84.          Overwrite it (Y/N) ?
  85.                  
  86.          If you then press Y, the file will be over written and   it's 
  87.          current  contents will be lost. However, if you press N  then 
  88.          the program will terminate.
  89.  
  90.          If less than  two parameters are specified after DGARBAGE, or 
  91.          if  the same file name is given for infile and outfile,   the  
  92.          program  will  display  it's help screen  and  terminate.  If  
  93.          infile does not exist, or if outfile can not be opened  (e.g.  
  94.          if it is set to READ ONLY), then an appropriate error message  
  95.          will be displayed and the program will terminate. 
  96.  
  97.  
  98.  
  99.  
  100.                                     OPTIONS 
  101.                                     ------- 
  102.  
  103.          The  options  listed  below  may be  entered  in  any  order, 
  104.          separated  by a space. They may be entered in upper or  lower 
  105.          case.  Note the comments for each option on the  restrictions 
  106.          (if any) in using that option with other options. 
  107.  
  108.  
  109.  
  110.          B     Use BIOS screen writing method. 
  111.  
  112.                The  default  is to use direct screen  memory  writing, 
  113.                however, this method doesn't work on all types of video 
  114.                adapter.  If you have problems with the  display,  then 
  115.                use the B option. 
  116.  
  117.  
  118.  
  119.          D     Display the text on the screen as it is processed. 
  120.  
  121.                The default is that the text is not displayed as it  is 
  122.                processed,  just an information box at the top  of  the 
  123.                screen which shows the progress of the processing. This 
  124.                is  the  fastest method,  allowing  approximately  9000 
  125.                characters to be processed per second. However, because 
  126.                the program uses very large buffers (30k for infile and 
  127.                31k for outfile) a seemingly long time can pass between 
  128.                updates  to the information box, which only take  place 
  129.                as each 30k block of text is read from disk.  Therefore 
  130.                the  D  option has been included for those  people  who 
  131.                like to be sure that something is happening. 
  132.  
  133.                The  effect of the D option depends on whether  or  not 
  134.                the B option is also specified. If the B option is  not 
  135.                specified then the text is displayed in a window at the 
  136.                bottom  of  the  screen using  the  fast  screen  write 
  137.                method.  This  slows  the  processing  speed  down   to 
  138.                approximately 1200  characters  per second.  If  the  B 
  139.                option  is specified in addition to the D  option  then 
  140.                the  text  is displayed using the  entire  screen  (the 
  141.                information  box is not displayed) and  the  processing 
  142.                speed  slows down to approximately 300  characters  per 
  143.                second. 
  144.  
  145.  
  146.          K/S   The  K  and S options control what action  the  program 
  147.                takes  when it encounters a character with the 8th  bit 
  148.                set - i.e. a character with an ASCII value greater than 
  149.                127. By default, these characters are removed from  the 
  150.                text stream entirely and do not appear in outfile. This 
  151.                was done because most "line noise" characters appear to 
  152.                be  in this range. However, these characters  are  also 
  153.                the  IBM  graphics  characters, so there  may  be  some 
  154.                occasions when it is not desirable to remove them. 
  155.  
  156.                The K option tells the program to pass these characters 
  157.                through  unchanged (Keep them) so they will  appear  in 
  158.                Outfile exactly as they appeared in infile. 
  159.  
  160.                The  S  option tells the program to strip the  8th  bit 
  161.                from these characters converting them to a character in 
  162.                the range 0-127. For example, the IBM horizontal double 
  163.                line character (═) which has an ASCII value of 205 will 
  164.                be  converted to a character with an ASCII value of  78 
  165.                which is the letter M. 
  166.  
  167.                These options only control what processing (if any)  is 
  168.                performed  on  characters with an ASCII  value  greater 
  169.                than  127. Characters with an ASCII value less than  32 
  170.                (excluding  CR/LF)  are ALWAYS removed  from  the  text 
  171.                stream. 
  172.  
  173.                Note  that the K and S options are mutuall